﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Site1.Master" AutoEventWireup="true" CodeBehind="SearchEditStudent.aspx.cs" Inherits="ES_Project.Pages.WebForm20" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<link type="text/css" href="js/js/css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" />	
<link type="text/css" href="js/js/css/jquery.timeentry.css" rel="stylesheet" />
  <script type="text/javascript" src="js/js/jquery-1.4.4.min.js"></script>
  <script type="text/javascript" src="js/js/jquery-ui-1.8.10.offset.datepicker.min.js"></script>
  <script type="text/javascript" src="js/js/jquery.datepick-th.js"></script>
  <script type="text/javascript" src="js/js/jquery-ui-timepicker-addon.js"></script>
  <script type="text/javascript" src="js/js/jquery.timeentry.js"></script>
  <script type="text/javascript" src="js/js/jquery.timeentry.min.js"></script>
  <script type="text/javascript" src="js/js/jquery.timeentry.pack.js"></script>
    <style type="text/css">
        

/* Overide css code กำหนดความกว้างของปฏิทินและอื่นๆ */ 
.ui-datepicker{

	width:190px;

	font-family:tahoma;

	font-size:11px;

	text-align:center;

}
/* css for timepicker */
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
</style>
    <style type="text/css">
        table{font-size:small;
margin-top: 0px;
    color: #000000;
}
TABLE {
	MARGIN-BOTTOM: 0px
}
        .style3
        {
            width: 59px;
        }
        .style4
        {
            width: 1167px;
        }
    .DNNAlignright {
	TEXT-ALIGN: right
}
select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}
INPUT {
	FONT: 700 small normal normal arial, helvetica, clean, sans-serif; COLOR: #057cc4; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px;
    text-align: left;
}
SELECT {
	FONT: 700 small normal normal arial, helvetica, clean, sans-serif; COLOR: #057cc4; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px
}
TEXTAREA {
	FONT: 700 small normal normal arial, helvetica, clean, sans-serif; COLOR: #057cc4; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px
}
TH {
	FONT-FAMILY: Tahoma, Arial, Helvetica; COLOR: #003366; FONT-SIZE: 12px; VERTICAL-ALIGN: baseline; FONT-WEIGHT: bold
}
        .style15
        {
            width: 100%;
        }
        .style19
        {
            width: 47px;
        }
        .style20
        {
            width: 1167px;
            font-size: small;
        }
        .style34
        {
            width: 208px;
        }
        .style35
        {
            width: 1167px;
            font-size: medium;
        }
        .style37
        {
            width: 120px;
            text-align: right;
        }
        .style38
        {
            font-size: small;
            text-align: left;
            width: 35px;
        }
        .style39
        {
            font-size: small;
            text-align: right;
            width: 208px;
        }
        .style40
        {
            font-size: small;
            font-weight: bold;
            text-align: left;
            width: 200px;
        }
    </style>
    
  <SCRIPT type=text/javascript>
      function getFormattedDate(date) {
          var day = date.getDate();
          var month = date.getMonth() + 1;
          var year = date.getFullYear().toString().slice(2);
          return day + '-' + month + '-' + year;
      }
      function GotoInput2(pagGo) {

          emailwindow = dhtmlmodal.open('EmailBox', 'iframe', pagGo, ' ', 'width=923px,height=545px,center=1,resize=0,scrolling=1')

          emailwindow.onclose = function () {


              return true

          }


      }

      function GotoInput(pagGo) {

          emailwindow = dhtmlmodal.open('EmailBox3', 'iframe', pagGo, ' ', 'width=840px,height=405px,center=1,resize=0,scrolling=1')

          emailwindow.onclose = function () {

              return true

          }
      }

      //-->

				</SCRIPT>
                <script type="text/javascript">
                    $(function BindEvents() {
                        var dateBefore = null;

                        $("#ContentPlaceHolder1_TextBox2").datepicker({


                            showOn: 'button',
                            isBuddhist: true,
                            buttonImage: 'images/formcal.gif',
                            buttonImageOnly: true
                        });

                    });</script>
                     <script type="text/javascript">
                         $(function BindEvents2() {
                             var dateBefore = null;

                             $("#ContentPlaceHolder1_TextBox3").datepicker({


                                 showOn: 'button',
                                 isBuddhist: true,
                                 buttonImage: 'images/formcal.gif',
                                 buttonImageOnly: true
                             });

                         });</script>
                          <script type="text/javascript">
                              $(function BindEvents3() {
                                  var dateBefore = null;

                                  $("#ContentPlaceHolder1_TextBox4").datepicker({


                                      showOn: 'button',
                                      isBuddhist: true,
                                      buttonImage: 'images/formcal.gif',
                                      buttonImageOnly: true
                                  });

                              });</script>
                               <script type="text/javascript">
                                   $(function BindEvents4() {
                                       var dateBefore = null;

                                       $("#ContentPlaceHolder1_TextBox5").datepicker({


                                           showOn: 'button',
                                           isBuddhist: true,
                                           buttonImage: 'images/formcal.gif',
                                           buttonImageOnly: true
                                       });

                                   });</script>

        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"/>
       
   
   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table cellpadding="0" cellspacing="0" class="style2">
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style35">
                        <strong>ค้นหาข้อมูลนักเรียน</strong></td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style4">
                        <table cellpadding="0" cellspacing="0" class="style15">
                            <tr>
                                <td class="style39">
                                    <b>รหัสนักเรียน :</b></td>
                                <td class="style34">
                                    
                                
                              
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </td>
                                <td class="style38">
                                    &nbsp;</td>
                                <td class="style37">
                                    &nbsp;</td>
                                <td class="style40">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style39">
                                    &nbsp;</td>
                                <td class="style34">
                                    &nbsp;</td>
                                <td class="style38">
                                    &nbsp;</td>
                                <td class="style37">
                                    &nbsp;</td>
                                <td class="style40">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style39">
                                    <b>วันที่สมัครเรียน :</b></td>
                                <td class="style34">
                                 <script type="text/javascript">
                                     Sys.Application.add_load(BindEvents); </script>
                                    <asp:TextBox ID="TextBox2" runat="server" onkeypress="getDate(this)" onChange="dateChang()"
                                      ></asp:TextBox>
                                </td>
                                <td class="style38">
                                    <strong>ถึง</strong></td>
                                <td class="style37">
                                    
                                    <strong>วันที่สมัครเรียน :</strong></td>
                                <td class="style40">
                                  <script type="text/javascript">
                                      Sys.Application.add_load(BindEvents2); </script>
                                    <asp:TextBox ID="TextBox3" runat="server" onkeypress="getDate(this)" ></asp:TextBox>
                                </td>
                                <td>
                                  
                                </td>
                            </tr>
                            <tr>
                                <td class="style39">
                                    &nbsp;</td>
                                <td class="style34">
                                    &nbsp;</td>
                                <td class="style38">
                                    &nbsp;</td>
                                <td class="style37">
                                    &nbsp;</td>
                                <td class="style40">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style39">
                                    <strong>วันที่เลิกเรียน :</strong></td>
                                <td class="style34">
                                 <script type="text/javascript">
                                     Sys.Application.add_load(BindEvents3); </script>
                                    <asp:TextBox ID="TextBox4" runat="server" onkeypress="getDate(this)" onChange="dateChang()"></asp:TextBox>
                                </td>
                                <td class="style38">
                                    <strong>ถึง</strong></td>
                                <td class="style37">
                                    <strong>วันที่เลิกเรียน :</strong></td>
                                <td class="style40">
                                 <script type="text/javascript">
                                     Sys.Application.add_load(BindEvents4); </script>
                                    <asp:TextBox ID="TextBox5" runat="server" onkeypress="getDate(this)" ></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style39">
                                    &nbsp;</td>
                                <td class="style34">
                                    &nbsp;</td>
                                <td class="style38">
                                    &nbsp;</td>
                                <td class="style37">
                                    &nbsp;</td>
                                <td class="style40">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style39">
                                    &nbsp;</td>
                                <td class="style34">
                                    &nbsp;&nbsp;<asp:Button ID="Button1" runat="server" Text="ค้นหา" 
                                        onclick="Button1_Click" />
                                    &nbsp;<asp:Button ID="Button2" runat="server" Text="เคลียร์" 
                                        onclick="Button2_Click" />
                                </td>
                                <td class="style38">
                                    &nbsp;</td>
                                <td class="style37">
                                    &nbsp;</td>
                                <td class="style40">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style20">
                        &nbsp;</td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style4">
                        <asp:GridView ID="GridView1" runat="server" Width="100%"  onRowDataBound="GridView1_RowDataBound" onpageindexchanging="GridView1_PageIndexChanging" 
                            AutoGenerateColumns="False"  border="1" CellPadding="4" ForeColor="#333333" 
                            GridLines="None" AllowPaging="True" PageSize="15">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                             <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                                              <HeaderTemplate>
                                                  ลำดับ
                                              </HeaderTemplate>
                                              <ItemTemplate>
                                                  <%#Container.DataItemIndex+1 %>
                                              </ItemTemplate>
                                              <ItemStyle HorizontalAlign="Center" />
                                          </asp:TemplateField>
                                <asp:TemplateField HeaderText="st_id" Visible="False">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="st_id" runat="server" Text='<%# Eval("st_id") %>' ></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="รหัสนักเรียน">
                                
                                
                                
                                    <ItemTemplate>
                                        <asp:HyperLink ID="st_code" runat="server" Text='<%# Eval("st_code") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                
                                
                                
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="ชื่อนักเรียน">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="st_name" runat="server" Text='<%# Eval("st_name") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="เพศ">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="st_gender" runat="server" Text='<%# Eval("st_gender") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="สถานบัน">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="st_school" runat="server" Text='<%# Eval("st_school") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="วันเกิด">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="st_birthday" runat="server" Text='<%# string.Format("{0:dd/MM/yyyy}", Eval("st_birthday")) %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="วันที่สมัครเรียน">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="register_date" runat="server" Text='<%# string.Format("{0:dd/MM/yyyy}", Eval("register_date")) %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="วันที่เลิกเรียน">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="st_end_date" runat="server" Text='<%# string.Format("{0:dd/MM/yyyy}", Eval("st_end_date")) %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style19">
                        &nbsp;</td>
                </tr>
            </table>
       </ContentTemplate>
    </asp:UpdatePanel>
     <br />
   <script type="text/javascript">
       function dateChang() {

           document.getElementById("ContentPlaceHolder1_TextBox3").value = document.getElementById("ContentPlaceHolder1_TextBox2").value;
           document.getElementById("ContentPlaceHolder1_TextBox5").value = document.getElementById("ContentPlaceHolder1_TextBox4").value;
       }
    
    </script>
</asp:Content>